import request from '@/utils/request.js';
//获取列表
export function selectApplyList(query){
    return request({
        url:'/apply/selectApplyList',
        method:'get',
        params:query
    })
}
export function selectAwardsList(query){
    return request({
        url:'/apply/selectAwardsList',
        method:'get',
        params:query
    })
}
export function insert(data){
    return request({
        url: '/apply/insert',
        method:'post',
        data: data
    })
}
export function checkApply(userId,awardsId){
    return request({
        url: '/apply/checkApply',
        method:'get',
        params:{
            userId:userId,
            awardsId:awardsId,
        }
    })
}
export function checkNum(userId,awardsId){
    return request({
        url: '/apply/checkNum',
        method:'get',
        params:{
            userId:userId,
            awardsId:awardsId,
        }
    })
}
export function refuse(userId,awardsId){
    return request({
        url: '/apply/refuse',
        method:'post',
        params:{
            userId:userId,
            awardsId:awardsId,
        }
    })
}
export function updateState(userId,awardsId){
    return request({
        url: '/apply/updateState',
        method:'post',
        params:{
            userId:userId,
            awardsId:awardsId,
        }
    })
}

export function deleteApply(userId,awardsId){
    return request({
        url: '/apply/delete',
        method:'delete',
        params:{
            userId:userId,
            awardsId:awardsId,
        }
    })
}

export function selectAwardsHisByUser(query){
    return request({
        url:'/apply/selectAwardsHisByUser',
        method:'get',
        params:query
    })
}